package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "task_mould_goods", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TaskMouldGoodsEntity extends IAcross
{
    public TaskMouldGoodsEntity()
    {
        super();
    }

    public TaskMouldGoodsEntity(IAcross ia)
    {
        super(ia);
    }

    private int tmdId;
    private Integer tmId;
    private Integer goodsType;
    private String goodsName;
    private BigDecimal price;
    private Integer numbers;
    private String url;
    private Integer createId;
    private Timestamp createDate;

    public TaskMouldGoodsEntity(String goodsName, Integer goodsType, Integer numbers, BigDecimal price) {
        this.goodsName = goodsName;
        this.goodsType = goodsType;
        this.numbers = numbers;
        this.price = price;
    }

    @Id
    @Column(name = "tmd_id")
    @GeneratedValue
    public int getTmdId() {
        return tmdId;
    }

    public void setTmdId(int tmdId) {
        this.tmdId = tmdId;
    }

    @Basic
    @Column(name = "tm_id")
    public Integer getTmId() {
        return tmId;
    }

    public void setTmId(Integer tmId) {
        this.tmId = tmId;
    }

    @Basic
    @Column(name = "goods_type")
    public Integer getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(Integer goodsType) {
        this.goodsType = goodsType;
    }

    @Basic
    @Column(name = "goods_name")
    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    @Basic
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "numbers")
    public Integer getNumbers() {
        return numbers;
    }

    public void setNumbers(Integer numbers) {
        this.numbers = numbers;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaskMouldGoodsEntity that = (TaskMouldGoodsEntity) o;

        if (tmdId != that.tmdId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createId != null ? !createId.equals(that.createId) : that.createId != null) return false;
        if (goodsName != null ? !goodsName.equals(that.goodsName) : that.goodsName != null) return false;
        if (goodsType != null ? !goodsType.equals(that.goodsType) : that.goodsType != null) return false;
        if (numbers != null ? !numbers.equals(that.numbers) : that.numbers != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (tmId != null ? !tmId.equals(that.tmId) : that.tmId != null) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tmdId;
        result = 31 * result + (tmId != null ? tmId.hashCode() : 0);
        result = 31 * result + (goodsType != null ? goodsType.hashCode() : 0);
        result = 31 * result + (goodsName != null ? goodsName.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (numbers != null ? numbers.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (createId != null ? createId.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
}
